﻿using UnityEngine;
using System.Collections;

namespace Baiyy {
	namespace Controls {
		/// <summary>
		/// 弹出窗口。
		/// </summary>
		public class PopupWindow : BaseWindow {

			public PopupWindow(string pkgName, string resName) : base(pkgName, resName) {
			}

			/// <summary>
			/// 弹出窗口。
			/// </summary>
			/// <param name="onlyMe">If set to <c>true</c> 则关闭已经打开的弹出窗口.</param>
			public void Popup(bool onlyMe = true) {
				UISystem.inst.Popup (this, onlyMe);
			}

			/// <summary>
			/// 关闭窗口。
			/// </summary>
			public void Close() {
				this.Dispose ();
			}
		}
	}
}
